package com.fanqiechaodan.flyweight;

/**
 * @author fanqiechaodan
 * @Classname Demo
 * @Description 享元模式
 */
public class Demo {

    public static void main(String[] args) {
        Product p1 = ProductFactory.getProduct("iPhone 14 Plus", 8899, 1);
        Product p2 = ProductFactory.getProduct("iPhone 14 Plus", 8899, 1);
        System.out.println(p1 == p2);
    }
}
